<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户列表</title>
</head>
<body>
<center>
    <div style="width:500px;height:auto;padding:10px;background-color:rgba(0,0,0,0.2)">
        <table border="1" cellpadding="5" style="border-collapse:collapse;">
            <thead><tr><td>编号</td><td>姓名</td><td>年龄</td><td>创建时间</td></tr></thead>
            <tbody>
            {% if persons %}
                {% for p in persons %}
                    <tr><td> {{ forloop.counter }}</td><td> {{ p.name }}</td><td> {{ p.age }}</td><td> {{ p.create_time }}</td></tr>
                {% endfor %}
            {% else %}
                <tr><td>没有数据</td></tr>
            {% endif %}
            </tbody>
        </table>
        </br>
        <a href="{% url 'myapp:index' %}"><button>返回主页</button></a>
    </div>
</center>
</body>
</html>